package com.bl.weilan.dao.repository;

import com.bl.weilan.dao.model.CompanyInvesterEntity;
import com.bl.weilan.dao.model.CompanyOpponentEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CompanyOpponentRepository extends JpaRepository<CompanyOpponentEntity, String> {
//    Page<CompanyOpponentEntity> findById(String companyId, Pageable pageable);
//    List<CompanyOpponentEntity> findByCompanya(String companyaId);
//
    List<CompanyOpponentEntity> findByTradeDId(String tradeDId);
    Page<CompanyOpponentEntity> findByTradeDId(String tradeDId, Pageable pageable);
    List<CompanyOpponentEntity> findByCompanyId(String companyId);

    List<CompanyOpponentEntity> findByCompanyIdAndTradeDId(String companyId, String tradeDId);

    void deleteByTradeDId(String tradeDId);

    void deleteByTradeDIdAndCompanyId(String tradeDId, String companyId);

    void deleteByCompanyId(String companyId);
}
